import config from "@/config"
import http from "@/utils/request"

export const getDeptList = (data) => {
	return http.post(`${config.API_SYS_BASE}/dept/list`, data).catch((err) => {
		console.log(err)
	});
}
export const getDeptById = (data) => {
	return http.post(`${config.API_SYS_BASE}/dept/getDept`, data).catch((err) => {
		console.log(err)
	});
}
export const addOrUpdate = (data) => {
	return http.post(`${config.API_SYS_BASE}/dept/addOrUpdate`, data).catch((err) => {
		console.log(err)
	});
}
export const deleteDept = (data) => {
	return http.post(`${config.API_SYS_BASE}/dept/delete`, data).catch((err) => {
		console.log(err)
	});
}
export const deptRelApi = (data) => {
	return http.post(`${config.API_SYS_BASE}/dept/relApi`, data).catch((err) => {
		console.log(err)
	});
}
